﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" CodeFile="Page_SearchService.aspx.cs" Inherits="Admin_Page_SearchService" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table style="width: 100%">
        <tr>
            <td>
                <table style="width: 100%">
                    <tr>
                        <td align="right" style="width: 177px">
                            Loại dịch vụ:</td>
                        <td>
                            <asp:DropDownList ID="ddlLoaiDV" runat="server" AppendDataBoundItems="true" DataSourceID="SqlDataSource1" 
                                DataTextField="Ten_EN" DataValueField="Ma" Width="383px">
                                <asp:ListItem Text="Tất cả" Value ="-1"></asp:ListItem>
                            </asp:DropDownList>
                            <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                                ConnectionString="<%$ ConnectionStrings:TramHuongDB2ConnectionString %>" 
                                SelectCommand="SELECT [Ma], [Ten_EN] FROM [LoaiDichVu]"></asp:SqlDataSource>
                        </td>
                    </tr>
                    <tr>
                        <td align="right" style="width: 177px">
                            Từ khóa:
                        </td>
                        <td>
                            <asp:TextBox ID="txtTuKhoa" runat="server" Width="265px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td align="right" style="width: 177px">
                            &nbsp;</td>
                        <td>
                            <asp:Button ID="btnTim" runat="server" Text="Tìm" onclick="btnTim_Click" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td align="center">
                <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                    AllowSorting="True" AutoGenerateColumns="False" BackColor="White" 
                    BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
                    DataKeyNames="Ma" DataSourceID="SqlDataSource2" Width="607px" 
                    onrowdatabound="GridView1_RowDataBound" 
                    onselectedindexchanging="GridView1_SelectedIndexChanging" 
                    onsorting="GridView1_Sorting">
                    <RowStyle BackColor="White" ForeColor="#003399" />
                    <Columns>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:HyperLink ID="HyperLink1" runat="server" ImageUrl="~/images/edit-icon.png" 
                                    NavigateUrl='<%# Eval("Ma","~/Admin/Page_UpdateService.aspx?Id={0}") %>'>HyperLink</asp:HyperLink>
                            </ItemTemplate>
                            <ItemStyle Width="30px" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="Ma" HeaderText="Mã" InsertVisible="False" 
                            ReadOnly="True" SortExpression="Ma">
                        <ItemStyle Width="50px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="MaLoai" HeaderText="Loại Dịch vụ" 
                            SortExpression="MaLoai">
                        </asp:BoundField>
                        <asp:BoundField DataField="Ten_EN" HeaderText="Tên EN" 
                            SortExpression="Ten_EN" />
                        <asp:BoundField DataField="Ten_RU" HeaderText="Tên RU" 
                            SortExpression="Ten_RU" />
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:HyperLink ID="HyperLink2" runat="server" 
                                    NavigateUrl='<%# Eval("Ma", "~/Admin/Page_ManagePrice.aspx?Id={0}") %>' 
                                    Text="Bảng giá"></asp:HyperLink>
                            </ItemTemplate>
                            <ItemStyle Width="50px" />
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
                    <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
                    <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
                    <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
                </asp:GridView>
                <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:TramHuongDB2ConnectionString %>" 
                    SelectCommand="SELECT [Ma], [MaLoai], [Ten_EN], [Ten_RU] FROM [DichVu]">
                </asp:SqlDataSource>
            </td>
        </tr>
    </table>
</asp:Content>

